import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { RouterModule }   from '@angular/router';//路由服务
import { FormsModule }   from '@angular/forms'; // <-- NgModel lives here
import { HttpModule }    from '@angular/http';//http服务


//
import { HeroService }  from './controller/hero.service';//服务

import {AppComponent } from './app.component';
import {HeroDetailComponent } from './xpage/hero-detail.component/hero-detail.component';
import {HeroesComponent }     from './xpage/heroes.component/heroes.component';
import {HomeHeader} from './Home/Header'
import {HomeIndex} from './Home/Index'
import {HomeLeftNav} from './Home/LeftNav'

import {Routing} from './router/app-routing.module';//路由模块

@NgModule({
  declarations: [
    AppComponent,
    HeroDetailComponent,
    HeroesComponent,
    HomeHeader,
    HomeIndex,
    HomeLeftNav
  ],
  imports: [
    BrowserModule,
    FormsModule,
    HttpModule,
    Routing
  ],
  providers: [HeroService],
  bootstrap: [AppComponent]
})
export class AppModule { }
